Image processing apparatus, image processing method, and program

ABSTRACT

In order to eliminate image deterioration based on the characteristics of an output device upon execution of edge emphasis processing, an image processing apparatus includes a setting unit which sets a print characteristic on the print medium, a region setting unit which sets a region, a brightness value derivation unit which derives brightness values, a first derivative derivation which derives first derivatives of the brightness values, an edge direction determination unit which determines an edge direction of brightness, an emphasis level determination unit which determines an emphasis level of a pixel value based on the first derivatives, and a replacement unit which calculates second derivatives of brightness values and replaces a pixel value of a pixel of interest based on the sign of the second derivative.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an image processing technique and, moreparticularly, to an edge emphasis technique of image data based on theimage printing characteristic.

2. Description of the Related Art

A copying machine which optically scans a document image and prints ascanned image on a print medium such as a paper sheet or the like isknown. In general, the edge of an image optically scanned by a scanningunit (scanner) of a copying machine is smoother than that of a documentimage. For this reason, an image with poor sharpness is output when thescanned image is printed on a print medium intact.

Hence, Japanese Patent No. 2620368 (reference 1) discloses an imagesignal processing method with the following characteristic feature. Thatis, in this method, when the distribution pattern of an image signal ata point of interest is convex upward, a signal replaced by an imageemphasis signal larger than an image signal at the point of interest isoutput; when the distribution pattern is convex downward, a signalreplaced by an image emphasis signal smaller than the image signal atthe point of interest is output; otherwise, a signal replaced by anoriginal image signal or unsharp signal is output. Also, Japanese PatentLaid-Open No. 07-288768 (reference 2) discloses a video signalprocessing method which replaces the level of a pixel of interest of animage by a replacement level generated using the pixel of interest andpixels which neighbor the pixel of interest. Furthermore, JapanesePatent Laid-Open No. 2004-056252 (reference 3) discloses a method whichavoids not only poor sharpness described above but also troubles such asdot omission and disappearance of thin lines at a reduction scale bychanging the resolution of a data input device or output device.

However, upon applying edge emphasis by the aforementioned method, theoutput image quality the user desired cannot always be improved. FIG. 8illustrates a state in which edge emphasis processing is applied toimage data including a bold character. Reference numeral 801 denotes anunprocessed image immediately after a document image is scanned; and802, an image upon printing an image that has undergone the edgeemphasis processing on a print medium. As can be seen from FIG. 8,application of the edge emphasis processing results in an illegiblecharacter since the spacings of black parts of the character arenarrowed down.

This problem arises from the difference of an expression region of apixel as a unit of image processing between the image processing such asedge emphasis and the like and an output device including a printprocess that reproduces the image. In particular, this problem occursprominently when a bold character as the type of character is scanned orwhen a document image includes a complicated kanji character (that witha large number of strokes). Also, an ink-jet printer causes ink bleedingon a print medium, and the problem of illegibility due to charactercollapse appears conspicuously. Since the problem of ink bleedingdepends on the characteristics of inks and print media, it variesdepending on different inks and print media or their combinations.

For this reason, the techniques disclosed in references 1 and 2 abovecannot solve these problems. When both the input and output devices havea sufficiently high degree of freedom in settings in association withthe resolution, the technique disclosed in reference 2 can eliminate theaforementioned problems. However, the device cost increasesconsiderably.

SUMMARY OF THE INVENTION

The present invention has been made in consideration of theaforementioned problems, and has as its object to solve at least one ofthe aforementioned problems.

According to one aspect of the present invention, an image processingapparatus for processing image data to be printed on a print medium byan image printing unit, comprising: a setting unit adapted to set aprint characteristic on the print medium in the image printing unit; aregion setting unit adapted to set a region configured by a plurality ofpixels including a pixel of interest; a brightness value derivation unitadapted to derive brightness values of the pixels in the region; a firstderivative derivation unit adapted to derive first derivatives of thebrightness values derived by the brightness value derivation unit for aplurality of pixel sequences in different directions, which include thepixel of interest; an edge direction determination unit adapted todetermine an edge direction of brightness at a position of the pixel ofinterest based on the results of the first derivatives at positions ofthe pixel of interest in the respective pixel sequences derived by thefirst derivative derivation unit; an emphasis level determination unitadapted to determine an emphasis level of a pixel value based on theprint characteristic and the first derivatives at respective positionsof a plurality of pixels which line up in the edge direction determinedby the edge direction determination unit; and a replacement unit adaptedto calculate second derivatives of brightness values at respectivepositions of the plurality of pixels which line up in the edge directiondetermined by the edge direction determination unit, to replace a pixelvalue of the pixel of interest by a pixel value obtained by adding theemphasis level to a pixel value of a pixel which has a minimumbrightness value in the pixel sequence when the second derivative at theposition of the pixel of interest assumes a positive value, and toreplace a pixel value of the pixel of interest by a pixel value obtainedby adding the emphasis level to a pixel value of a pixel which has amaximum brightness value in the pixel sequence when the secondderivative at the position of the pixel of interest assumes a negativevalue, wherein the replacement unit adjust the calculated secondderivatives of brightness values in accordance with the printcharacteristic on the print medium set by the setting unit.

According to another aspect of the present invention, an imageprocessing method for processing image data to be printed on a printmedium by an image printing unit, comprising: a setting step of settinga print characteristic on the print medium in the image printing unit; aregion setting step of setting a region configured by a plurality ofpixels including a pixel of interest; a brightness value derivation stepof deriving brightness values of the pixels in the region; a firstderivative derivation step of deriving first derivatives of thebrightness values derived in the brightness value derivation step for aplurality of pixel sequences in different directions, which include thepixel of interest; an edge direction determination step of determiningan edge direction of brightness at a position of the pixel of interestbased on the results of the first derivatives at positions of the pixelof interest in the respective pixel sequences derived in the firstderivative derivation step; an emphasis level determination step ofdetermining an emphasis level of a pixel value based on the printcharacteristic and the first derivatives at respective positions of aplurality of pixels which line up in the edge direction determined inthe edge direction determination step; and a replacement step ofcalculating second derivatives of brightness values at respectivepositions of the plurality of pixels which line up in the edge directiondetermined in the edge direction determination step, replacing a pixelvalue of the pixel of interest by a pixel value obtained by adding theemphasis level to a pixel value of a pixel which has a minimumbrightness value in the pixel sequence when the second derivative at theposition of the pixel of interest assumes a positive value, andreplacing a pixel value of the pixel of interest by a pixel valueobtained by adding the emphasis level to a pixel value of a pixel whichhas a maximum brightness value in the pixel sequence when the secondderivative at the position of the pixel of interest assumes a negativevalue, wherein the replacement step adjust the calculated secondderivatives of brightness values in accordance with the printcharacteristic on the print medium set by the setting step.

According to still another aspect of the present invention, a program,stored in a computer-readable storage medium, for making a computerexecute processing of image data to be printed on a print medium by animage printing unit, the program comprising: a program code forimplementing a setting step of setting a print characteristic on theprint medium in the image printing unit; a program code for implementinga region setting step of setting a region configured by a plurality ofpixels including a pixel of interest; a program code for implementing abrightness value derivation step of deriving brightness values of thepixels in the region; a program code for implementing a first derivativederivation step of deriving first derivatives of the brightness valuesderived in the brightness value derivation step for a plurality of pixelsequences in different directions, which include the pixel of interest;a program code for implementing an edge direction determination step ofdetermining an edge direction of brightness at a position of the pixelof interest based on the results of the first derivatives at positionsof the pixel of interest in the respective pixel sequences derived inthe first derivative derivation step; a program code for implementing anemphasis level determination step of determining an emphasis level of apixel value based on the print characteristic and the first derivativesat respective positions of a plurality of pixels which line up in theedge direction determined in the edge direction determination step; anda program code for implementing a replacement step of calculating secondderivatives of brightness values at respective positions of theplurality of pixels which line up in the edge direction determined inthe edge direction determination step, replacing a pixel value of thepixel of interest by a pixel value obtained by adding the emphasis levelto a pixel value of a pixel which has a minimum brightness value in thepixel sequence when the second derivative at the position of the pixelof interest assumes a positive value, and replacing a pixel value of thepixel of interest by a pixel value obtained by adding the emphasis levelto a pixel value of a pixel which has a maximum brightness value in thepixel sequence when the second derivative at the position of the pixelof interest assumes a negative value, wherein the program code forimplementing a replacement step adjust the calculated second derivativesof brightness values in accordance with the print characteristic on theprint medium set by the program code for implementing a setting step.

According to yet another aspect of the present invention, an imageprocessing apparatus for processing image data, comprising: a regionsetting unit adapted to set a region configured by a plurality of pixelsincluding a pixel of interest; a determination unit adapted to determinea change characteristic of an image associated with the pixel ofinterest using the plurality of pixels in the set region; a printcharacteristic setting unit adapted to set a print characteristic on aprint medium by a printing unit; and a modification unit adapted tomodify the pixel of interest using the pixels in the region set by theregion setting unit, and to correct a value of the modified pixel ofinterest based on the set print characteristic.

According to still yet another aspect of the present invention, an imageprocessing method for processing image data, comprising: a regionsetting step of setting a region configured by a plurality of pixelsincluding a pixel of interest; a determination step of determining achange characteristic of an image associated with the pixel of interestusing the plurality of pixels in the set region; a print characteristicsetting step of setting a print characteristic on a print medium by aprinting unit; and a modification step of modifying the pixel ofinterest using the pixels in the region set by the region setting unit,and correcting a value of the modified pixel of interest based on theset print characteristic.

According to yet still another aspect of the present invention, aprogram, stored in a computer-readable storage medium, for making acomputer execute processing of image data, the program comprising: aprogram code for implementing a region setting step of setting a regionconfigured by a plurality of pixels including a pixel of interest; aprogram code for implementing a determination step of determining achange characteristic of an image associated with the pixel of interestusing the plurality of pixels in the set region; a program code forimplementing a print characteristic setting step of setting a printcharacteristic on a print medium by a printing unit; and a program codefor implementing a modification step of modifying the pixel of interestusing the pixels in the region set by the region setting unit, andcorrecting a value of the modified pixel of interest based on the setprint characteristic.

According to the present invention, an edge emphasis technique that caneliminate image deterioration of a printed image of a digital imagedepending on the types of recording media.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments with reference to theattached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute apart of the specification, illustrate embodiments of the invention and,together with the description, serve to explain the principles of theinvention.

FIG. 1 shows schematic perspective views of a multi function printer(MFP) according to the first embodiment;

FIG. 2 is a block diagram showing the internal arrangement of the MFP;

FIG. 3 is a flowchart of the overall processing to be executed by animage processor of the MFP;

FIG. 4 is a view for explaining a processing unit of image processesupon execution of the image processes;

FIG. 5 is a flowchart for explaining the operation for shifting aprocessing unit;

FIGS. 6A and 6B are views illustrating a range of reflected light whichcomes from a document and enters one pixel of an image sensing element;

FIG. 7 illustrates a state in which an ink drop lands on a print mediumand is printed;

FIG. 8 illustrates a state in which edge emphasis processing is appliedto image data including a bold character (prior art);

FIG. 9 is a detailed flowchart of an edge processing operation accordingto the first embodiment;

FIG. 10 shows graphs for explaining edge intensity settings;

FIG. 11 is a view for explaining pixel value extraction from pixelsequences in four directions;

FIG. 12 is a graph showing the input/output characteristics of contractcorrection;

FIGS. 13A and 13B are graphs illustrating changes in brightness value,first derivative, and second derivative for two different patterns;

FIG. 14 is a view for explaining derivation of a first derivative (Grd);

FIG. 15 shows graphs for explaining a fluctuation count;

FIG. 16 is a table showing adjustment amounts (Lap change amounts) forrespective print medium types;

FIG. 17 is a table showing adjustment amounts (Lap change amounts) forrespective character line widths;

FIG. 18 is a detailed flowchart of an edge processing operationaccording to a modification; and

FIG. 19 is a table for explaining a determination method of areplacement pixel position.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Preferred exemplary embodiments of the present invention will bedescribed in detail hereinafter with reference to the accompanyingdrawings. Note that building components described in these embodimentsare merely examples, and they do not limit the scope of the invention.

First Embodiment

As the first embodiment of an image processing apparatus according tothe present invention, an MFP (Multi Function Printer) will beexemplified below. In the following description, the apparatusarrangement and schematic operation of the MFP as a precondition will beexplained first, and characteristic features of the present inventionwill then be explained in detail.

<Arrangement of MFP>

FIG. 1 shows schematic perspective views of a multi function printer (tobe referred to as an MFP hereinafter) according to the first embodiment.

An MFP 100 comprises a function of printing data received from a hostcomputer (PC) as a normal PC printer on a printing medium, and afunction of scanning a document image as a scanner. Furthermore,functions of the MFP alone include a copy function of printing an imagescanned by the scanner using the printer, a function of printing imagedata directly read from a storage medium such as a memory card or thelike, or a function of printing image data received from a digitalcamera or the like.

To implement these functions, the MFP 100 comprises a scanning device134 such as a flatbed scanner or the like, and a printing device 133 ofan ink-jet system, electrophotography system, or the like. Also, the MFP100 comprises a display panel 139 used to notify the user of variousstates, and an operation panel 135 including various key switches, andthe like, which are used to accept various instructions from the user.The MFP 100 comprises a USB port (not shown) on its back surface used tocommunicate with the PC, and the USB port allows the MFP 100 to makevarious communications with the PC. In addition to the abovearrangement, the MFP 100 comprises a card slot 142 used to read out datafrom various memory cards, and a camera port 143 used to make directcommunication with a digital still camera (DSC). In addition, the MFP100 comprises an auto document feeder (to be abbreviated as ADFhereinafter) 131 used to automatically set a document on a documenttable.

FIG. 2 is a block diagram showing the internal arrangement of the MFP100.

A CPU 211 controls various functions of the MFP 100 by executing variousimage processing programs stored in a ROM 216 in accordance withoperations accepted from the user at an operation unit 215.

A scanning unit 214 corresponds to the scanning device 134, scans adocument image using an optical sensor such as a CCD or the like, andoutputs analog brightness data of, for example, red (R), green (G), andblue (B). The scanning unit 214 may comprise a contact image sensor(CIS) in place of the CCD. Using the aforementioned ADF 131, thescanning unit 214 can successively scan order sheets and the like.

A card interface 222 corresponds to the card slot 142, and reads imagedata, which is captured by, for example, a DSC and is stored in a memorycard or the like, in accordance with an operation by the user at theoperation unit 215. Note that the color space of image data read via thecard interface 222 is converted from that (e.g., YCbCr) of the DSC intoa standard RGB color space (e.g., NTSC-RGB or sRGB) if necessary. Theread image data undergoes processes such as resolution conversion intothe effective number of pixels and the like based on its headerinformation as needed. A camera interface 223 corresponds to the cameraport 143, and reads image data by directly connecting a DSC.

An image processor 212 is a functional unit for applying image processesto be described later to image data. For example, the image processor212 executes image processes such as image analysis, calculations ofconversion characteristics, conversion from brightness signals (RGB)into density signals (CMYK), scaling, gamma conversion, error diffusion,and the like. The image data that has undergone these image processes isstored in a RAM 217. When data stored in the RAM 217 reaches apredetermined data size required to be printed by a printing unit 213corresponding to the printing device 133, the printing unit 213 executesa print operation.

A nonvolatile RAM 218 comprises, for example, a battery backed-up SRAMor the like, and stores data unique to the image processing apparatus orthe like.

The operation unit 215 corresponds to the operation panel 135, and is afunctional unit that accepts various operations from the user. Forexample, the operation unit 215 comprises keys specialized to attainspecific processes such as a photo direct print start key which allowsthe user to select image data stored in a storage medium (memory card)and to start printing, a key used to print an order sheet, a key used toscan an order sheet, and the like. The operation unit 215 also comprisesa copy start key in a monochrome copy mode or color copy mode, a modekey used to designate a mode such as a copy resolution, image quality,and the like, a stop key used to stop a copy operation or the like.Furthermore, the operation unit 215 comprises a numerical keypad used toinput a copy count, a registration key, and the like. The CPU 211detects the pressing states of these keys and controls respective unitsaccording to the detected states.

A display unit 219 corresponds to the display panel 139, comprises a dotmatrix type liquid crystal display unit (LCD) and an LCD driver, andmakes various displays under the control of the CPU 211. Also, thedisplay unit 219 may display thumbnails of image data recorded on astorage medium.

The printing unit 213 corresponds to the printing device 133, andcomprises an ink-jet head of an ink-jet system, general-purpose IC, andthe like. The printing unit 213 reads out image data stored in the RAM217 and prints it out as a hard copy under the control of the CPU 211.

A drive unit 221 includes stepping motors for driving feed and dischargerollers, gears for transmitting the driving forces of the steppingmotors, a driver circuit for controlling the stepping motors, and thelike in the operations of the scanning unit 214 and printing unit 213.

A sensor unit 220 includes a print sheet width sensor, print sheetsensor, document width sensor, document sensor, print medium sensor, andthe like. The CPU 211 detects the states of a document and print sheetbased on information obtained from this sensor unit 220.

A PC interface 224 is an interface between the PC and MFP 100. The MFP100 can accept a print operation, scan operation, and the like from thePC via the PC interface 224.

In a copy operation by the MFP 100 alone, the image processor 212processes image data, which is scanned by the scanning unit 214 based onthe user's operation at the operation unit 215, and the printing unit213 prints the processed image data.

<Overview of Image Processes>

FIG. 3 is a flowchart of the processes executed by the image processorof the MFP. Respective steps will be described below, but a detaileddescription of the processes will not be given. Note that the followingsteps are implemented when the CPU 211 executes various controlprograms.

In step S301, the CPU 211 executes shading correction. That is, the CPU211 applies processing for correcting variations of an image sensingelement to image data, which is scanned by the scanning unit 214 and isA/D-converted.

In step S302, the CPU 211 executes input device color conversion. Thisprocessing converts image data expressed by an input device-dependentcolor space into a standard color space. The standard color spaceincludes sRGB standardized by IEC (International ElectrotechnicalCommission), AdobeRGB propounded by Adobe Systems, and the like. Theconversion method includes an arithmetic method using a 3×3 or 3×9matrix, a lookup table method which determines values based on a tablethat describes conversion rules, and the like.

In step S303, the CPU 211 executes image correction/modificationprocessing. More specifically, the image correction/modificationprocessing includes edge emphasis processing that corrects blurring as aresult of scanning, text modification processing that improveslegibility of text, processing for removing bleed-through that hasoccurred due to scanning upon light irradiation, and the like. Note thatdetails of the edge emphasis processing will be described later.

In step S304, the CPU 211 executes enlargement/reduction processing.This processing converts image data to a desired scale when the userdesignates a zoom scale, a 2-in-1 copy mode that lays out two documentimages on one sheet, or the like. As the conversion method, methods suchas bicubic, nearest neighbor, and the like are generally used.

In step S305, the CPU 211 executes output device color conversion. Thisprocessing converts image data expressed by the standard color spaceinto that data expressed by an output device-dependent color space. Forexample, when the printing unit 213 of the MFP 100 of this embodimentadopts an ink-jet system that uses inks of cyan (C), magenta (M), yellow(Y), black (K), and the like, RGB data is converted into CMYK data. Thisconversion processing is the same as that in step S302.

In step S306, the CPU 211 executes quantization processing of imagedata. That is, the CPU 211 converts image data into tone levels that canbe printed by the printing unit 213. For example, in case of binaryexpression, that is, ON/OFF of ink dots in the ink-jet printing unit,image data may be binarized by a quantization method such as errordiffusion or the like. As a result, the quantization processing canconvert image data into a data format that the printing unit 213 canprocess, and the printing unit 213 executes a print operation based onthis image data.

<Image Processing Unit>

FIG. 4 is a view for explaining a processing unit of the image processesupon execution of the image processes.

A case will be explained below wherein the processing unit is a pixelunit. Assuming that a pixel indicated by “o” in an upper view of FIG. 4is a pixel of interest (pixel to be processed), a region (7×7 region)defined by 7×7 pixels including the pixel of interest is set, asindicated by the bold line in the upper view of FIG. 4. A correctionintensity for the pixel of interest is set using the image data in the7×7 region set in this way, thus correcting the pixel of interest. Aftercorrection of the pixel of interest, a pixel that neighbors the pixel ofinterest is set as the next pixel of interest, as indicated by “x” in,for example, a middle view of FIG. 4, and a 7×7 region is set to havethe pixel indicated by “x” as the pixel of interest, so as to similarlyexecute the correction processing. After that, the pixel of interest issimilarly shifted pixel by pixel in turn and a new 7×7 region is set ineach case, thus correcting all pixels to be corrected.

A case will be explained below wherein the processing unit is a regionunit. A 7×7 region is set for a pixel indicated by “o” in the upper viewof FIG. 4, and a correction intensity to be set for “o” is applied to aplurality of pixels, that is, all pixels, in the 7×7 region. As the nextprocessing unit, a 7×7 region is set for a pixel indicated by “Δ” in alower view of FIG. 4. In this way, the processing unit is shifted, sothat the 7×7 region for “o” neighbors that for “Δ”. However, the pixelunit is preferably used as the processing unit to set the correctionintensity at higher accuracy. In the embodiments to be describedhereinafter, the pixel unit will be described as the processing unit.

FIG. 5 is a flowchart for explaining the operation for shifting theprocessing unit.

Step S501 is setting processing of a processing target (pixel to beprocessed). After the start of the processing, the CPU 211 sets a firstpixel to be processed. If the process returns from step S505 to stepS501, the CPU 211 sets the next pixel to be processed.

In step S502, the CPU 211 sets a processing region. The processingregion is a region configured by a plurality of pixels (7×7 region)including the processing unit, as described above.

In step S503, the CPU 211 sets a correction intensity. That is, the CPU211 sets a correction intensity for the processing unit.

In step S504, the CPU 211 corrects the processing unit using thecorrection intensity set in step S503.

The CPU 211 determines the last correction target in step S505, that is,checks if the processed processing unit is the last one. If theprocessing unit is not the last one (NO), the process returns to stepS501. If the processing unit is the last one (YES), this processingends.

In replacement processing of this embodiment, the 7×7 region will bedescribed as the processing region. This is because the pixel range of adocument to be scanned by one pixel of the image sensing element (CCD orCIS) used in the scanning device 134 described using FIG. 1 and thescanning unit 214 described using FIG. 2 is designed to include sixpixels or less. Although the pixel range to be scanned is designed toinclude six pixels or less, reflected light from a document that entersthe image sensing element receives various influences due to float of adocument from the document table, unevenness of a document, and thelike. For this reason, one pixel of the image sensing element may scan arange exceeding six pixels. The embodiments to be described hereinaftershow a plurality of graphs used to explain image signals obtained byscanning a document. However, these image signals are not alwaysobtained from reflected light within six pixels or less.

FIGS. 6A and 6B illustrate the range of reflected light that comes froma document and enters one pixel of the image sensing element. As shownin FIG. 6A, the image sensing element used in this embodiment isdesigned so that reflected light within six pixels from a 7-pixel rangeof a document enters one pixel of the image sensing element (asdescribed above, reflected light that exceeds six pixels may enter insome cases). That is, reflected light from one pixel on a documentinfluences seven pixels of the image sensing element. This causes edgeblurring described in the paragraphs of the related art, anddeteriorates sharpness.

Therefore, upon execution of the edge emphasis processing based on pixelvalue replacement, by selecting a replacement candidate from a pixelregion less influenced by a document pixel corresponding to the pixel ofinterest, the edge emphasis effect can be enhanced. For this reason, inorder to ensure a minimal region which is influenced by one pixel of adocument image as the processing region, the 7×7 region is set as theprocessing region. However, in order to enhance the edge emphasis effectmore, it is effective to set a region exceeding 7×7 pixels as areference region. Also, when one pixel of the image sensing element isdesigned to receive reflected light from a 3-pixel range of a document,as shown in FIG. 6B, the processing region may be set as small as a 3×3region. In this manner, the reference region can be set as needed inaccordance with the performance of the image sensing element such as thenumber of pixels of the image sensing element influenced by one pixel ofa document image, the spot size, the number of blurred pixels,Modulation Transfer Function (MTF), and the like.

Definitions and limitations of terms used in the description of theembodiments of the present invention will be described below.

In the embodiment to be described below, a fluctuation count will bedescribed as the number of sign changes (the number of zero-crossingpoints) in brightness changes in a region of interest. However, thepresent invention is not limited to such specific definition. That is,the fluctuation count is defined as a value that expresses the frequencyof occurrence of changes in value associated with image signals such asthe number of zero-crossing points or spatial frequency of the firstderivatives of values associated with image signals in the region ofinterest, the number of black-white changes after binarization, and thelike.

In the embodiment to be described below, a fluctuation amount will bedescribed as the absolute value (edge amount) of the brightnessdifference with respect to a pixel of interest. However, the presentinvention is not limited to such specific definition. That is, thefluctuation amount is defined as a value that expresses the difference(magnitude) of changes such as the absolute value of the firstderivative of a value related to an image signal of a pixel of interestor the like, or as a value that representatively expresses thedifference (magnitude) of changes of values related to image signals ina region of interest.

In the embodiment to be described below, a fluctuation acceleration willbe described as a value obtained by further calculating a differencefrom the differences of brightness values in the region of interest.However, the present invention is not limited to such specificdefinition. That is, the fluctuation acceleration is defined as a valuethat expresses the acceleration of changes such as the second derivativeof values associated with image signals in the region of interest andthe like.

In the embodiment to be described below, a saturation will be explainedas a maximum absolute value of image signal differences of respectivecolors of a pixel or region of interest. However, the present inventionis not limited to such specific definition. The saturation is defined asa value that expresses the distance from the brightness axis.

As will be described in the embodiment to be described below, adaptivesetting of a correction intensity is defined such that differentcorrection intensities are set for each value in at least some valueregions of those which the defined fluctuation count, fluctuationamount, fluctuation acceleration, and saturation can assume.

Details of the embodiment will be described below. Note that in theembodiment, an image signal is expressed by RGB components, and eachcomponent is expressed as an 8-bit integer value (0 to 255 in decimal).However, the range of the image signal is not limited to such a specificrange, and may be set to fit the image processes. Note that white isexpressed as R=G=B=255, and black is expressed as R=G=B=0.

<Output Device Characteristics>

The following description will be given taking ink bleeding caused bycombinations of print medium types and inks as an example of the outputdevice characteristics.

FIG. 7 illustrates a state in which an ink drop lands on a print mediumand is printed. A frame indicated by the broken line indicates a spacingcorresponding to a pixel as a minimum unit of image processing. Forexample, upon execution of processing at 600 pixels per inch (600 DPI),one side of one grid is 42.3 μm. On the other hand, a circle indicatesone ejected ink dot corresponding to one printed pixel.

Reference numeral 701 denotes a printed state upon ejecting ink onto acopy paper sheet generally called plain paper. In an ink-jet printerused in this embodiment, the diameter of one dot is 100 μm. On the otherhand, reference numeral 702 denotes a printed state upon ejecting inkonto a print medium called photo print paper designed for the purpose ofphoto printing. Since an ink absorption layer is coated on the surfaceof the photo dedicated paper, this paper suffers less ink bleeding, andhas higher coloring characteristics than plain paper. For this reason,the diameter of one dot is 80 μm smaller than that of plain paper.

Upon execution of processing for emphasizing an image edge part, theprocessing result may be different from that the user intended if thestate of ink landing on a print medium is not considered. Particularlyin a character image, since the contour line of a character gets thick,this causes character collapse, resulting in an illegible character.

Factors that contribute to the dot size when ink lands on a print mediuminclude print medium types, ink compositions, and environmental factorssuch as temperature, humidity, and the like. This embodiment executesimage processing using a correction table that corrects the dot sizecaused depending on the print medium types of these fluctuation factors.

<Details of Correction Operation>

FIG. 9 is a detailed flowchart of the edge processing operationaccording to the first embodiment. Note that the type of recording mediaused to print out an image is set in advance in the image processor ofthe MFP 100 prior to the beginning of this flowchart. The type settingmay be designated by the user or may be automatically made in accordancewith the location of a paper tray or the like where print media are set.Also, a print medium may be directly detected using an optical sensor orthe like.

In step S901, the CPU 211 applies contrast correction to an imageconfigured by RGB multi-valued image signals. FIG. 12 shows theinput/output characteristics of contrast correction. In this step, theCPU 211 corrects contrast by converting the scanned brightness values(RGB signal values) using a one-dimensional lookup table. In particular,the one-dimensional lookup table with characteristics that convert apart (background part) close to white, which seems as a sheet surface ofa document, into white, and a part (black part) close to black, whichseems as a character, into black, is used.

Note that the one-dimensional lookup table need not always be a tablefor all input brightness values. For example, only a table forbrightness values of the background part and black part may be prepared,and other brightness values may be processed as an input value=outputvalue without looking up the table. Also, the implementation method ofcontrast correction is not limited to specific processing using theone-dimensional lookup table. For example, contrast may be corrected byarithmetic processing using input/output functions.

In step S902, the CPU 211 sets a processing region, that is, a 7×7region including seven pixels in the horizontal direction and sevenpixels in the vertical direction to have the pixel of interest as thecenter in the image that has undergone the contrast correction.Furthermore, the CPU 211 generates a 7×7 processing region of brightnessY by calculating brightness Y from respective pixel values of theprocessing region by:

Y=0.29891×R+0.58661×G+0.11448×B  (11)

This embodiment uses brightness Y calculated using equation (11).However, other values may be used as long as they express a lightnesscomponent of an input pixel. For example, an L* value in the L*a*b*color space expression or an L value in the LUV color space expressionmay be used. In place of use of these color spaces intact, a color spacethat approximately expresses these color spaces may be used for the sakeof simple calculation.

Note that the processing region size is defined by 7×7 pixels in thisembodiment. However, as has been explained in the description of theimage processing unit, the processing region size may be expressed byother numbers of pixels as needed.

FIGS. 13A and 13B illustrate changes in brightness value (Y), firstderivative equivalent amount (Grd), and second derivative equivalentamount (Lap) corresponding to pixel positions for two types of patternshaving different features. The upper graphs of FIGS. 13A and 13B showchanges in brightness values. FIG. 13A shows a change in brightnessvalue corresponding to pixel positions upon scanning a black verticalline in a white background in the horizontal direction. On the otherhand, FIG. 13B shows a change in brightness value corresponding to pixelpositions upon scanning halftone dots, that line up in the horizontaldirection in a white background, in the horizontal direction.

In step S903, the CPU 211 extracts, from the processing region of Ygenerated in step S902, pixel values from pixel sequences in at leasttwo directions. For example, the CPU 211 extracts pixel values of sevenpixels in each of a total of four directions, that is, one horizontaldirection 1101, one vertical direction 1102, and two oblique directions1103 and 1104, as shown in FIG. 11.

In step S904, the CPU 211 calculates differences Grd corresponding tofirst derivatives of Y of five pixels in each direction from Y in thefour directions extracted in step S903, as shown in FIG. 14, and using:

Grd(i)=Y(i+1)−Y(i−1)  (12)

where Y(i−1) is a pixel before pixel Y(i), and Y(i+1) is a pixel afterpixel Y(i).

Note that the difference between two pixels before and after the pixelof interest is calculated so that the derived Grd value corresponds toeach pixel position. However, other methods may be used. For example,differences between neighboring pixels may be calculated, or differencesbetween pixels further separated from those before and after a givenpixel described above may be calculated. In this case, interpolationprocessing or the like may be used together, so that the pixel positionmatches that where the Grd value is derived.

Middle graphs of FIGS. 13A and 13B show changes in Grd value calculatedby applying equation (12) to the brightness values X in the uppergraphs.

In step S905, the CPU 211 calculates Grd absolute values in the fourdirections at the position of the pixel of interest in Grd in the fourdirections calculated in step S904 and determines an edge direction.More specifically, the CPU 211 determines a direction that shows amaximum Grd absolute value of those in the four directions as an edgedirection of the pixel of interest. Note that a direction may beobtained from the Grd values in the two directions by using anarctangent function.

In step S906, the CPU 211 derives, as an edge amount, a maximum absolutevalue from five pixels of Grd of the edge direction calculated in stepS904 in the edge direction determined in step S905. That is, an edge isstronger with increasing edge amount, and is close to flat withdecreasing edge amount.

In step S907, the CPU 211 calculates a fluctuation count as a total ofthe four directions from the Grd values in the four directionscalculated in step S904. Note that the fluctuation count corresponds tothe frequency.

FIG. 15 shows graphs for explaining a fluctuation count. The fluctuationcount is the number of times the sign of Grd changes from + to − or viceversa, as shown in a graph 1501. Alternatively, the fluctuation count(the number of zero-crossing points) of the pixel of interest isobtained by calculating the number of times the sign of Grd changesfrom + to 0 and then to − at the next pixel, or from − to 0 and thento + at the next pixel, as shown in a graph 1502. That is, the number oftimes of changes shown in each of the graphs 1501 and 1502 is counted astwice. In this embodiment, a case will be described wherein thefrequency is derived by counting the number of times the sign changesfrom + to − or vice versa. Of course, the CPU 211 may directly derivefrequency components using an FFT operation or the like.

Note that this embodiment does not count, as the fluctuation count, acase in which the sign changes to sandwich zeros of a plurality ofpixels, as shown in a graph 1503, or a case in which the Grd valuebecomes zero but its sign does not change, as shown in a graph 1504.

In step S908, the CPU 211 extracts a pixel sequence in the edgedirection determined in step S905 from those in the four directionsextracted in step S903. The CPU 211 determines pixel positions withmaximum Y and minimum Y based on the extracted pixel sequence of theseven pixels.

In step S909, the CPU 211 calculates a fluctuation acceleration Lap asthe second derivative of three pixels from Grd of the edge directioncalculated in step S904 in the edge direction determined in step S905.The calculation method of the fluctuation acceleration is described by:

Lap(i)=Grd(i+1)−Grd(i−1)  (13)

where Grd(i−1) is a pixel before pixel Grd(i), and Grd(i+1) is a pixelafter that pixel. Note that the calculation method of the fluctuationacceleration is not limited to such a specific equation, and thedifference between neighbor Grd values may be calculated. Of course, ageneral Laplacian mask or DOG filter may be used.

Lower graphs of FIGS. 13A and 13B respectively show changes in Lapvalues corresponding to the pixel position, which are calculated byapplying equation (13) to Grd shown in the upper graphs.

Checked to Here

In step S910, the CPU 211 adjusts the Lap(i) value calculated in stepS909 based on the output device characteristics. This embodiment willexplain an example in which the print medium type is designated as theoutput device characteristics. That is, this embodiment supportsadjustment of ink bleed depending on the print medium type. The CPU 211derives an adjusted fluctuation acceleration Lap′(i) by:

Lap′(i)=Lap(i)+DEVICE(print medium type)  (14)

where DEVICE(print medium type) is a function of the adjustment amountdepending on the print medium type.

That is, the CPU 211 derives Lap′(i) by adding an adjustment amount,which is determined in advance for each print medium type, to Lap(i)calculated in step S909.

FIG. 16 is a table showing adjustment amounts (Lap change amounts)corresponding to respective print medium types. That is, FIG. 16 showsthe adjustment amounts corresponding to dot sizes determined dependingon the types of print media and inks set in the printer. The printmedium type is set in advance in the image processor of the MFP 100, asdescribed above.

When this adjustment amount assumes a larger value, the pixel value iscorrected to the smaller brightness value side in step S915 to bedescribed later. That is, the edge part is more likely to whiten. As aresult, too strong edge emphasis of a character can be avoided.

This embodiment has explained the example in which only the print mediumtype is designated as the output device characteristics. Of course,correction based on the ink type may be executed. Upon execution ofcorrection for a plurality of fluctuation factors such as the types ofprint media and inks, a correction table of their combinations isprepared in advance to execute processing, thus obtaining bettercorrection results. In this embodiment, a single correction tablecorresponding to brightness Y is used. However, a plurality ofcorrection tables corresponding to respective ink colors may beprepared, and corrections may be independently executed using thesetables.

In step S911, the CPU 211 determines a replacement pixel position basedon the pixel positions with maximum Y and minimum Y determined in stepS908 and the adjusted fluctuation acceleration Lap′(i) calculated instep S910.

FIG. 19 is a table for explaining the determination method of thereplacement pixel position. In FIG. 13A or 13B, when the sign of Lap is+, Y of the pixel of interest tends to assume a value, the magnitude ofwhich is closer to minimum Y than maximum Y; when the sign of Lap is −,Y of the pixel of interest tends to assume a value, the magnitude ofwhich is closer to maximum Y than minimum Y. Hence, in this embodiment,the replacement pixel position is determined, as shown in FIG. 19. Notethat handling of the edge center where Lap of the pixel of interestbecomes zero is not limited to FIG. 19. When Lap of the pixel ofinterest is zero, the pixel position with maximum Y or minimum Y may bedetermined as the replacement pixel position.

In step S912, the CPU 211 adaptively sets an edge intensity Cz based onthe fluctuation count calculated in step S907. A graph 1001 in FIG. 10is used to explain the Cz setting in step S912: the abscissa plots thefluctuation count, and the ordinate plots Cz. In case of the fluctuationcount which is smaller than a first threshold and with which a textregion is more likely to be determined, Cz is set to be 1 to emphasizethe edge. In case of the fluctuation count which is larger than a secondthreshold and with which a halftone region that readily causes moiré athigh LPI is more likely to be determined, Cz is set to be 0 so as not toemphasize moiré. In case of the fluctuation count falling within a rangebetween the first and second thresholds (both inclusive), different Czis adaptively set for each fluctuation count to obscure switching of theprocesses. More specifically, the CPU 211 can adaptively set Cz usingequation (15) below corresponding to the graph 1001:

Cz=(second threshold−fluctuation count)/(second threshold−firstthreshold)  (15)

Note that when the fluctuation count=first threshold, Cz=1; when thefluctuation count=second threshold, Cz=0.

In step S913, the CPU 211 adaptively sets an edge intensity Ce inaccordance with the edge amount calculated in step S906. A graph 1002 inFIG. 10 is used to explain the Ce setting in step S913: the abscissaplots the edge amount, and the ordinate plots Ce. In case of thefluctuation amount which is smaller than a third threshold and withwhich a flat region is more likely to be determined, Ce=0 is set so asnot to roughen an image by emphasizing small fluctuation amounts. Incase of the fluctuation amount which is larger than a fourth thresholdand with which an edge region is more likely to be determined, Ce=1 isset to apply edge emphasis. In case of the fluctuation amount fallingwithin a range between the third and fourth thresholds (both inclusive),different Ce is adaptively set for each edge amount, so as to obscureswitching of the processes. More specifically, the CPU 211 canadaptively set Ce using equation (16) below corresponding to the graph1002:

Ce=(edge amount−third threshold)/(fourth threshold−thirdthreshold)  (16)

Note that when the edge amount=third threshold, Ce=0; when the edgeamount=fourth threshold, Ce=1.

In step S914, the CPU 211 calculates a replacement level using the pixelvalue at the replacement pixel position determined in step S911. Morespecifically, the CPU 211 extracts RGB values at the replacement pixelposition determined in step S911 from the RGB 7×7 regions set in stepS902. Let N0 be the value of the pixel of interest, C0 be the pixelvalue at the replacement pixel position, and ΔC be the replacementlevel. Then, the CPU 211 can calculate ΔC using:

ΔC=C0−N0  (17)

where ΔC, C0, and N0 are matrices having R, G, and B as elements.

In step S915, the CPU 211 adjusts the replacement amount ΔC calculatedin step S914 by the replacement intensity Cz set in step S912. The CPU211 calculates an adjusted replacement amount ΔCz using:

ΔCz=Cz×ΔC  (18)

where ΔCz is a matrix having R, G, and B as elements.

In step S916, the CPU 211 adjusts the replacement amount ΔCz calculatedin step S915 by the replacement intensity Ce set in step S913. The CPU211 calculates an adjusted replacement amount iCe using:

ΔCe=Ce×ΔCz  (19)

where ΔCe is a matrix having R, G, and B as elements.

In step S917, the CPU 211 executes pixel value replacement by adding thereplacement amount ΔCe calculated in step S916 to the pixel value N0 ofthe pixel of interest to calculate a value Nc of the pixel of interest,which has undergone edge emphasis, using:

Nc=N0+ΔCe  (20)

where Nc is a matrix having R, G, and B as elements. Note thatprocessing for clipping the Nc value within a desired range may beinserted.

As described above, in the MFP according to the first embodiment, theedge emphasis technique that can eliminate image deterioration of adigital image can be provided. More specifically, excessive correctioncan be avoided for an output device represented by an ink-jet printer,which has ink bleed as its print characteristics, thus obtaining ahigh-quality output image. Furthermore, since the correction table canbe changed in accordance with the types of print media and inks,correction can be made in consideration of print characteristics basedon various print media and inks, and a high-quality output result can beobtained in accordance with various combinations of print media andinks.

(Modification)

The first embodiment has explained the method of adjusting the intensityof the edge processing based on the output device characteristics suchas the print medium type, ink type, and the like. However, adjustmentneed not always be done based only on the output device characteristics.For example, the intensity of the edge processing may be adjusted basedon a user's instruction. That is, the present invention may adopt aconfiguration that designates the character line width in a printedimage based on user's choice in, e.g., a character document image.

FIG. 18 is a detailed flowchart of the edge processing operationaccording to a modification. Step S1810 as that different from FIG. 9will be described below. Assume that the user selects and sets fivedifferent character line width designations in advance in the imageprocessor of the MFP 100 prior to the beginning of this flowchart.

In step S1810, the CPU 211 adjusts the Lap(i) value calculated in stepS1808 based on the output device characteristics. This modification willexplain an example in which the character line width is designated asthe output device characteristics. That is, this modification supportsadjustment of ink bleed depending on the character line width. The CPU211 derives an adjusted fluctuation acceleration Lap′(i) by:

Lap′(i)=Lap(i)+DEVICE(selected character line width)  (21)

where DEVICE(selected character line width) is a function of theadjustment amount depending on the character line width.

That is, the CPU 211 derives Lap′(i) by adding an adjustment amount,which is determined in advance for each character line width, to Lap(i)calculated in step S1809.

FIG. 17 is a table showing adjustment amounts (Lap change amounts)corresponding to respective character line widths. That is, FIG. 17shows the adjustment amounts corresponding to dot sizes determineddepending on the character line widths and ink types set in the printer.When this adjustment amount assumes a larger value, the pixel value iscorrected to the smaller brightness value side in step S1815 to bedescribed later. That is, the edge part is more likely to whiten. As aresult, a thin character is printed.

Note that correction may be made by combining the first embodiment,i.e., the table of print medium types. An arithmetic expression at thattime is described by:

Lap′(i)=Lap(i)+DEVICE(print medium type)+DEVICE(user selectedvalue)  (22)

Since each correction amount of this embodiment is a scalar quantityexpressed by DEVICE( ) a plurality of correction tables can beindependently processed to apply correction. With the aforementionedcorrection processing, the line width of a character to be printed canbe changed based on a user's instruction.

Other Embodiments

The embodiments of the present invention have been explained in detail.The present invention may be applied to either a system constituted by aplurality of devices, or an apparatus consisting of a single device.

Note that the present invention is also achieved by directly or remotelysupplying a program that implements the functions of the aforementionedembodiments to a system or apparatus, and reading out and executing thesupplied program code by a computer of that system or apparatus.Therefore, the technical scope of the present invention includes theprogram code itself installed in a computer to implement the functionalprocesses of the present invention using the computer.

In this case, the form of program is not particularly limited, and anobject code, a program to be executed by an interpreter, script data tobe supplied to an OS, and the like may be used as long as they have theprogram function.

As a recording medium for supplying the program, for example, a Floppy®disk, hard disk, optical disk (CD, DVD), and magneto-optical disk,magnetic tape, nonvolatile memory card, ROM, and the like may be used.

As another program supply method, the program may be supplied asfollows. That is, a connection is established to a homepage on theInternet using a browser of a client computer, and the program itselfaccording to the present invention or a compressed file that includes anautomatic installation function may be downloaded to a recording mediumsuch as a hard disk or the like. Also, the program code that forms theprogram of the present invention may be segmented into a plurality offiles, which may be downloaded from different homepages. That is, theclaims of the present invention include a WWW server which makes aplurality of users download a program required to implement thefunctional processes of the present invention by the computer.

A storage medium such as a CD-ROM or the like, which stores theencrypted program of the present invention, may be delivered to theusers. The user who has cleared a predetermined condition may be allowedto download key information that decrypts the program from a homepagevia the Internet, and the encrypted program may be executed using thatkey information to be installed on a computer, thus implementing thepresent invention.

Moreover, the functions of the aforementioned embodiments can beimplemented not only by executing the readout program by the computerbut also by some or all of actual processes executed by an OS or thelike which runs on a computer based on instructions of the program.

In addition, the functions of the aforementioned embodiments can also beimplemented by some or all of actual processes executed by a CPUequipped on a function expansion board or unit, which is inserted in orconnected to the computer, based on instruction of the program read outfrom the recording medium, after the program is written in a memoryequipped on the function expansion board or unit.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2006-184846, filed Jul. 4, 2006, which is hereby incorporated byreference herein, in its entirety.

1. An image processing apparatus for processing image data to be printedon a print medium by an image printing unit, comprising: a setting unitadapted to set a print characteristic on the print medium in the imageprinting unit; a region setting unit adapted to set a region configuredby a plurality of pixels including a pixel of interest; a brightnessvalue derivation unit adapted to derive brightness values of the pixelsin the region; a first derivative derivation unit adapted to derivefirst derivatives of the brightness values derived by said brightnessvalue derivation unit for a plurality of pixel sequences in differentdirections, which include the pixel of interest; an edge directiondetermination unit adapted to determine an edge direction of brightnessat a position of the pixel of interest based on the results of the firstderivatives at positions of the pixel of interest in the respectivepixel sequences derived by said first derivative derivation unit; anemphasis level determination unit adapted to determine an emphasis levelof a pixel value based on the print characteristic and the firstderivatives at respective positions of a plurality of pixels which lineup in the edge direction determined by said edge direction determinationunit; and a replacement unit adapted to calculate second derivatives ofbrightness values at respective positions of the plurality of pixelswhich line up in the edge direction determined by said edge directiondetermination unit, to replace a pixel value of the pixel of interest bya pixel value obtained by adding the emphasis level to a pixel value ofa pixel which has a minimum brightness value in the pixel sequence whenthe second derivative at the position of the pixel of interest assumes apositive value, and to replace a pixel value of the pixel of interest bya pixel value obtained by adding the emphasis level to a pixel value ofa pixel which has a maximum brightness value in the pixel sequence whenthe second derivative at the position of the pixel of interest assumes anegative value, wherein said replacement unit adjust the calculatedsecond derivatives of brightness values in accordance with the printcharacteristic on the print medium set by said setting unit.
 2. Theapparatus according to claim 1, wherein the print characteristic isdesignated based on at least one of a type of the image printing unitand a type of the print medium.
 3. The apparatus according to claim 1,wherein said emphasis level determination unit comprises: a fluctuationcount derivation unit adapted to derive a fluctuation count ofbrightness values based on the first derivatives at the respectivepositions of the plurality of pixels which line up in the edgedirection; and a fluctuation amount derivation unit adapted to derive afluctuation amount of brightness values based on the first derivativesat the respective positions of the plurality of pixels which line up inthe edge direction, and said emphasis level determination unitdetermines the emphasis level of the pixel value based on at least oneof the fluctuation count and the fluctuation amount.
 4. The apparatusaccording to claim 3, wherein said emphasis level determination unitcomprises a first comparison unit adapted to compare the fluctuationcount with a first threshold and a second threshold larger than thefirst threshold, sets the emphasis level to be a designated maximumvalue when the fluctuation count is smaller than the first threshold,sets the emphasis level to a designated minimum value when thefluctuation count is larger than the second threshold, and sets theemphasis level by linear interpolation using the maximum value and theminimum value when the fluctuation count is larger than the firstthreshold and is smaller than the second threshold.
 5. The apparatusaccording to claim 3, wherein said emphasis level determination unitcomprises a second comparison unit adapted to compare the fluctuationcount with a third threshold and a fourth threshold larger than thethird threshold, sets the emphasis level to be a designated minimumvalue when the fluctuation count is smaller than the third threshold,sets the emphasis level to a designated maximum value when thefluctuation count is larger than the fourth threshold, and sets theemphasis level by linear interpolation using the maximum value and theminimum value when the fluctuation count is larger than the thirdthreshold and is smaller than the fourth threshold.
 6. The apparatusaccording to claim 1, wherein the image data includes a character image,and the print characteristic is a designation of a line width of acharacter to be printed on the print medium.
 7. An image processingmethod for processing image data to be printed on a print medium by animage printing unit, comprising: a setting step of setting a printcharacteristic on the print medium in the image printing unit; a regionsetting step of setting a region configured by a plurality of pixelsincluding a pixel of interest; a brightness value derivation step ofderiving brightness values of the pixels in the region; a firstderivative derivation step of deriving first derivatives of thebrightness values derived in the brightness value derivation step for aplurality of pixel sequences in different directions, which include thepixel of interest; an edge direction determination step of determiningan edge direction of brightness at a position of the pixel of interestbased on the results of the first derivatives at positions of the pixelof interest in the respective pixel sequences derived in the firstderivative derivation step; an emphasis level determination step ofdetermining an emphasis level of a pixel value based on the printcharacteristic and the first derivatives at respective positions of aplurality of pixels which line up in the edge direction determined inthe edge direction determination step; and a replacement step ofcalculating second derivatives of brightness values at respectivepositions of the plurality of pixels which line up in the edge directiondetermined in the edge direction determination step, replacing a pixelvalue of the pixel of interest by a pixel value obtained by adding theemphasis level to a pixel value of a pixel which has a minimumbrightness value in the pixel sequence when the second derivative at theposition of the pixel of interest assumes a positive value, andreplacing a pixel value of the pixel of interest by a pixel valueobtained by adding the emphasis level to a pixel value of a pixel whichhas a maximum brightness value in the pixel sequence when the secondderivative at the position of the pixel of interest assumes a negativevalue, wherein said replacement step adjust the calculated secondderivatives of brightness values in accordance with the printcharacteristic on the print medium set by said setting step.
 8. Aprogram, stored in a computer-readable storage medium, for making acomputer execute processing of image data to be printed on a printmedium by an image printing unit, said program comprising: a programcode for implementing a setting step of setting a print characteristicon the print medium in the image printing unit; a program code forimplementing a region setting step of setting a region configured by aplurality of pixels including a pixel of interest; a program code forimplementing a brightness value derivation step of deriving brightnessvalues of the pixels in the region; a program code for implementing afirst derivative derivation step of deriving first derivatives of thebrightness values derived in the brightness value derivation step for aplurality of pixel sequences in different directions, which include thepixel of interest; a program code for implementing an edge directiondetermination step of determining an edge direction of brightness at aposition of the pixel of interest based on the results of the firstderivatives at positions of the pixel of interest in the respectivepixel sequences derived in the first derivative derivation step; aprogram code for implementing an emphasis level determination step ofdetermining an emphasis level of a pixel value based on the printcharacteristic and the first derivatives at respective positions of aplurality of pixels which line up in the edge direction determined inthe edge direction determination step; and a program code forimplementing a replacement step of calculating second derivatives ofbrightness values at respective positions of the plurality of pixelswhich line up in the edge direction determined in the edge directiondetermination step, replacing a pixel value of the pixel of interest bya pixel value obtained by adding the emphasis level to a pixel value ofa pixel which has a minimum brightness value in the pixel sequence whenthe second derivative at the position of the pixel of interest assumes apositive value, and replacing a pixel value of the pixel of interest bya pixel value obtained by adding the emphasis level to a pixel value ofa pixel which has a maximum brightness value in the pixel sequence whenthe second derivative at the position of the pixel of interest assumes anegative value, wherein said program code for implementing a replacementstep adjust the calculated second derivatives of brightness values inaccordance with the print characteristic on the print medium set by saidprogram code for implementing a setting step.
 9. An image processingapparatus for processing image data, comprising: a region setting unitadapted to set a region configured by a plurality of pixels including apixel of interest; a determination unit adapted to determine a changecharacteristic of an image associated with the pixel of interest usingthe plurality of pixels in the set region; a print characteristicsetting unit adapted to set a print characteristic on a print medium bya printing unit; and a modification unit adapted to modify the pixel ofinterest using the pixels in the region set by said region setting unit,and to correct a value of the modified pixel of interest based on theset print characteristic.
 10. The apparatus according to claim 9,wherein the change characteristic includes a fluctuation amount and afluctuation count of brightness values of the plurality of pixels in theregion, and said modification unit replaces a color of the pixel ofinterest by a color calculated using a pixel having a maximum brightnessvalue or a minimum brightness value in the region in accordance with afluctuation acceleration, and corrects the fluctuation acceleration asthe correction.
 11. An image processing method for processing imagedata, comprising: a region setting step of setting a region configuredby a plurality of pixels including a pixel of interest; a determinationstep of determining a change characteristic of an image associated withthe pixel of interest using the plurality of pixels in the set region; aprint characteristic setting step of setting a print characteristic on aprint medium by a printing unit; and a modification step of modifyingthe pixel of interest using the pixels in the region set by said regionsetting unit, and correcting a value of the modified pixel of interestbased on the set print characteristic.
 12. The method according to claim11, wherein the change characteristic includes a fluctuation amount anda fluctuation count of brightness values of the plurality of pixels inthe region, and in the modification step, a color of the pixel ofinterest is replaced by a color calculated using a pixel having amaximum brightness value or a minimum brightness value in the region inaccordance with a fluctuation acceleration, and the fluctuationacceleration is corrected as the correction.
 13. A program, stored in acomputer-readable storage medium, for making a computer executeprocessing of image data, said program comprising: a program code forimplementing a region setting step of setting a region configured by aplurality of pixels including a pixel of interest; a program code forimplementing a determination step of determining a change characteristicof an image associated with the pixel of interest using the plurality ofpixels in the set region; a program code for implementing a printcharacteristic setting step of setting a print characteristic on a printmedium by a printing unit; and a program code for implementing amodification step of modifying the pixel of interest using the pixels inthe region set by said region setting unit, and correcting a value ofthe modified pixel of interest based on the set print characteristic.14. The program according to claim 13, wherein the change characteristicincludes a fluctuation amount and a fluctuation count of brightnessvalues of the plurality of pixels in the region, and the program codefor implementing the modification step replaces a color of the pixel ofinterest by a color calculated using a pixel having a maximum brightnessvalue or a minimum brightness value in the region in accordance with afluctuation acceleration, and corrects the fluctuation acceleration asthe correction.